package com.model.dto.sys.LogController;


import com.model.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.util.Date;

@Data
public class GetLoginLogDTO  extends BaseEntity {

    @ApiModelProperty(value = "操作系统")
    @Size(min = 0, max = 50, message = "os不合法")
    String os;

    @ApiModelProperty(value = "用户名")
    @Size(min = 0, max = 50, message = "userName不合法")
    String userName;

    @ApiModelProperty(value = "创建时间(yyyy-MM-dd)")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    Date createTime;

    @ApiModelProperty(value = "更新时间(yyyy-MM-dd)")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    Date updateTime;

    @ApiModelProperty(value = "状态只能为0或1或2(0:用户,1:管理员,2:游客)",allowableValues = "0,1,2")
    @Min(value = 0, message = "状态只能为0或1或2(0:用户,1:管理员,2:游客)")
    @Max(value = 2, message = "状态只能为0或1或2(0:用户,1:管理员,2:游客)")
    Byte userType;

}
